﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using WebTest.Core.Entities.OrderAggregate;

namespace WebTest.Infrastructure.Data.Config
{
    public class OrderConfiguration : IEntityTypeConfiguration<Order>
    {
        public void Configure(EntityTypeBuilder<Order> builder)
        {
            builder.Ignore(b => b.TotalPrice);

            builder.HasKey(b => b.Id);

            builder.HasOne(b => b.OrderAddress);
        }
    }
}
